import { AuthApi } from '@/enums/apiEnum';
import { defHttp } from '@/utils/http/axios';
import { GetAuthCodeModel, LoginModel, LoginParam } from './authModel';
// import request from '@/utils/request';



export function login(loginParam: LoginParam) {
    return defHttp.post<LoginModel>({ url: AuthApi.Login, data: loginParam });
}

export function getCodeImage() {
    return defHttp.get<GetAuthCodeModel>({ url: AuthApi.GetCodeImage });

}

export function logout() {
    return defHttp.delete({
        url: AuthApi.Logout
    })
}